﻿@model IEnumerable<HotelManageSystem.Domain.Entities.Room>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Template.cshtml";
    <link href="../../Content/RoomTable.css" rel="stylesheet" type="text/css" />  
    <link href="../../Content/popup.css" rel="stylesheet" type="text/css" />
    <script src="../../JS/popup.js" type="text/javascript"></script>
  
}
<div class="Linemenu" align="center">
    <ul id="stateList">
        <li style="width: 100px;color:#ffffff ">wrwr</li>
        <li style="background-color: rgb(19, 115, 8);"><a href="@Url.Action("ShowRoomByState", "Room", new {id=1})">空闲房(@ViewBag.FreeStateCount)</a> </li>
        <li style="background-color: rgb(205, 183, 25);"><a href="@Url.Action("ShowRoomByState", "Room", new {id=2})">已入住(@ViewBag.UsedStateCount)</a> </li>
        <li style="background-color: Red;"><a href="@Url.Action("ShowRoomByState", "Room", new {id=3})">维修中(@ViewBag.RepairStateCount)</a> </li>
        <li style="background-color: rgb(35, 251, 251);"><a href="@Url.Action("ShowRoomByState", "Room", new {id=4})">打扫中(@ViewBag.CleanStateCount)</a> </li>
        <li style="background-color: rgb(92, 20, 59);"><a href="@Url.Action("ShowRoomByState", "Room", new {id=5})">已预订(@ViewBag.BookStateCount)</a> </li>
    </ul>
</div>
<div style="height: 50px">
</div>
<div class="roommenu" id="showAll">
    <ul id="show">
        @foreach (var item in Model)
        {

            if (@item.RoomState.ID == 1)
            {
                <li id="@item.ID"  value="@item.RoomState.ID"  onmousemove="this.style.background = ' rgb(30, 85, 176)' " onmouseout=" this.style.background = ' rgb(19, 115, 8)' "
                    style="background-color: rgb(19, 115, 8)" onclick="numberOfClient(event)">
                    <div>
                        @item.Name
                        &nbsp;
                        @item.RoomType.Name
                    </div>
                </li>
            }
            if (@item.RoomState.ID == 2)
            {
                <li id="@item.ID" value="@item.RoomState.ID"  style="background-color: rgb(205, 183, 25)" onmousemove="this.style.background = ' rgb(30, 85, 176)' "
                    onmouseout=" this.style.background = '  rgb(205, 183, 25)' ">
                    <div>
                        @item.Name
                        &nbsp;
                        @item.RoomType.Name
                    </div>
                </li>
            }
            if (@item.RoomState.ID == 3)
            {
                <li id="@item.ID" value="@item.RoomState.ID"  style="background-color: Red" onmousemove="this.style.background = ' rgb(30, 85, 176)' "
                    onmouseout=" this.style.background = 'Red' " onclick="testMessageBox(event)">
                    <div>
                        @item.Name
                        &nbsp;
                        @item.RoomType.Name
                    </div>
                </li>
            }
            if (@item.RoomState.ID == 4)
            {
                <li id="@item.ID" value="@item.RoomState.ID" style="background-color: rgb(35, 251, 251);" onmousemove="this.style.background = ' rgb(30, 85, 176)' "
                    onmouseout=" this.style.background = ' rgb(35, 251, 251)'" onclick="testMessageBox(event)" >
                    <div>
                        @item.Name
                        &nbsp;
                        @item.RoomType.Name
                    </div>
                </li>
            }
            if (@item.RoomState.ID == 5)
            {
                <li id="@item.ID" value="@item.RoomState.ID" style="background-color: rgb(92, 20, 59);" onmousemove="this.style.background = 'rgb(30, 85, 176)' "
                    onmouseout=" this.style.background = 'rgb(92, 20, 59)'" onclick="testMessageBox(event)">
                    <div>
                        @item.Name
                        &nbsp;
                        @item.RoomType.Name
                    </div>
                </li>
            }
        }
    </ul>
</div>
